<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var flag =  true;
        if(flag){
            //flag为true则执行大括号里面的语句
            //flag为false则不执行大括号里面的语句
            console.log("我是真的");
            
        }
        var num1 = 10;
        var num2 = 20;
        if(num1 < num2){ //表达式
            console.log("num1小，num2大");
            
        }
        var x = 1;
        var y = 2;
        if(x = y){ //赋值表达式不具有比较作用
            console.log(x);//2
            
        }


    </script>
</body>
</html>